<style type="text/css">
    div.line{
        width:850px;
        height:50px;
    }
    
    div.down{
        background: url(../images/arrow-down.png) no-repeat;
        background-position: center;
        height:50px;
        width:100px;
    }
    
    div.oddNumber div {
        width:100px;
        height:50px;
        line-height:50px;
        float:left;
        color:#FFFFFF;
    }
    
    div.evenNumber div {
        width:100px;
        height:50px;
        line-height:50px;
        float:right;
        color:#FFFFFF;
    }
    
    div.quelity{
        background:#72C770;
    }
    
    div.product{
        background:#94D1F8;
    }
    
    dd.exdd{
        float:right;
    }
    
    dd.exdd div{
        width:60px;
        height:25px;
        line-height:20px;
        float:left;
        color:#FFFFFF;
        margin-left: 5px;
    }
</style>
<div class="pageContent">
    <div class="pageFormContent">
        <fieldset>
        <legend><@label key='orderForm.C'>订单</@label></legend>
        <dl>
            <dt><@label key='productionControlNum.C,colon'>生产管理号：</@label></dt>
            <dd><input type="text" name="productionControlNum" value="${productionControl.productionOrderNum!''}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='orderStatusECode.C,colon'>订单状态：</@label></dt>
            <dd><select name="statuseCode" disabled="disabled">
                    <option value="" ><@label key='all.C'>所有</@label></option>
                    <#if orderStatusECode??>
                        <#list orderStatusECode as ecode>
                            <option value="${ecode.eCode!''}" <#if productionControl.statuseCode?? && productionControl.statuseCode == ecode.eCode> selected</#if> >${ecode.eCodeText!''}</option>
                        </#list>
                    </#if>
                </select>
            </dd>
        </dl>
        <dl>
            <dt><@label key='productionlotNum.C,colon'>生产批次号：</@label></dt>
            <dd><input type="text" name="productionlotNum" value="${productionControl.productionlotNum!''}" readonly="readonly" /></dd>
        </dl>
        <dl>
            <dt><@label key='materialCode.C,colon'>物料编号：</@label></dt>
            <dd>
                <input class="required" name="materialLookup.materialCode" type="text" postField="componentText" value="${productionControl.materialCode!''}" readonly="readonly" />
            </dd>
        </dl>
        <dl>
            <dt><@label key='materialText.C,colon'>物料名称：</@label></dt>
            <dd><input name="materialLookup.materialText" type="text" value="${productionControl.materialText!''}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='workCenterCode.C,colon'>工作中心编号：</@label></dt>
            <dd><input  type="text" value="${productionControl.workCenterCode!''}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='productionOrderNum.C,colon'>生产订单编号：</@label></dt>
            <dd><input type="text" name="productionOrderNum" class="required" value="${productionControl.productionOrderNum!''}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='orderType.C,colon'>订单类型：</@label></dt>
            <dd><input type="text" class="required" value="${productionControl.orderTypeText!''}" readonly="readonly"/>
            </dd>
        </dl>
        <dl>
            <dt><@label key='plannedQuantity.C,colon'>计划数量</@label></dt>
            <dd><input type="text" name="plannedQuantity" class="required number" readonly="readonly" value="${productionControl.plannedQuantity!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='requirementDate.C,colon'>需求日期：</@label></dt>
            <dd><input type="text" name="requirementDate" class="required" readonly="readonly" value="${(productionControl.requirementDate?string('yyyy-MM-dd'))?if_exists}"/></dd>
        </dl>
        <dl>
            <dt><@label key='plannedstartDateTime.C,colon'>计划开始时间：</@label></dt>
            <dd><input type="text" name="plannedstartDateTime" class="required" value="${(productionControl.plannedstartDateTime?string('yyyy-MM-dd HH:mm:ss'))?if_exists}"
             readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='plannedendDateTime.C,colon'>计划结束时间：</@label></dt>
            <dd><input type="text" name="plannedendDateTime" class="required" value="${(productionControl.plannedendDateTime?string('yyyy-MM-dd HH:mm:ss'))?if_exists}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='actualstartDateTime.C,colon'>实际开始时间：</@label></dt>
            <dd><input type="text" name="actualstartDateTime" class="required" value="${(productionControl.actualstartDateTime?string('yyyy-MM-dd HH:mm:ss'))?if_exists}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='actualendDateTime.C,colon'>实际结束时间：</@label></dt>
            <dd><input type="text" name="actualendDateTime" class="required" value="${(productionControl.actualendDateTime?string('yyyy-MM-dd HH:mm:ss'))?if_exists}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='completedQuantity.C,colon'>完工数量：</@label></dt>
            <dd><input type="text" name="completedQuantity" class="required number" readonly="readonly" value="${productionControl.completedQuantity!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='scrappedQuantity.C,colon'>报废数量：</@label></dt>
            <dd><input type="text" name="scrappedQuantity" class="required number" readonly="readonly" value="${productionControl.scrappedQuantity!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='repairQuantity.C,colon'>返修数量：</@label></dt>
            <dd><input type="text" name="repairQuantity" class="required number" readonly="readonly" value="${productionControl.repairQuantity!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='customer.C,colon'>客户：</@label></dt>
            <dd><input type="text" name="customer"  readonly="readonly" value="${productionControl.customer!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='customerOrder.C,colon'>客户订单：</@label></dt>
            <dd><input type="text" name="customerOrder"  readonly="readonly" value="${productionControl.customerOrder!''}"/></dd>
        </dl>
         <dl>
            <dt><@label key='priority.C,colon'>优先级：</@label></dt>
            <dd><input type="text" name="priority" readonly="readonly" value="${productionControl.priority!''}"/></dd>
        </dl>
        </fieldset>
        <fieldset>
            <legend><@label key='process.C'>工艺</@label></legend>
            <dl>
                <dt><@label key='cmprocess_code.C,colon'>工艺编号：</@label></dt>
                <dd><input type="text" name="processCode" maxlength="20" readonly="readonly" value="${productionControl.processCode!''}"/></dd>
            </dl>
            <dl>
                <dt><@label key='cmprocess_name.C,colon'>工艺名称：</@label></dt>
                <dd><input type="text" name="processText" maxlength="60" readonly="readonly" value="${productionControl.processText!''}"/></dd>
            </dl>
            <dl>
                <dt><@label key='cmprocessrev.C,colon'>版本号：</@label></dt>
                <dd><input type="text" name="processRev" maxlength="20" readonly="readonly" value="${productionControl.processRev!''}" /></dd>
            </dl>
            <#if operationArchives?exists>
                <#assign sumcount = operationArchives?size />
            <dl class="nowrap">
                <dd>
                    <#list operationArchives as opa>
                        <div class="line <#if opa.isodd>oddNumber<#else>evenNumber</#if>">
                            <#list opa.operations as pop>
                                <#if pop.operationTypeEcode?? && pop.operationTypeEcode=="PRODUCTION">
                                <div class="quelity"><#if pop.confirmFlag==1><div style="width:10px;line-height:10px;float:left">v</div></#if><div title="${pop.operationOrdinal!''}-${pop.operationText!''}" style="width:90px;line-height:50px;float:left">${pop.operationOrdinal!''}-${pop.operationText!''}</div></div>
                                <#else>
                                <div class="product"><#if pop.confirmFlag==1><div style="width:10px;line-height:10px">v</div></#if><div title="${pop.operationOrdinal!''}-${pop.operationText!''}" style="width:90px;line-height:50px;float:left">${pop.operationOrdinal!''}-${pop.operationText!''}</div></div>
                                </#if>
                                <#if pop_index+1 != opa.count>
                                    <#if opa.isodd>
                                    <div style="background: url(../images/arrow-right.png) no-repeat;background-position: center;width:50px"></div>
                                    <#else>
                                    <div style="background: url(../images/arrow-left.png) no-repeat;background-position: center;width:50px"></div>
                                    </#if>
                                </#if>
                            </#list>
                        </div>
                        <#if opa_index+1 lt sumcount>
                            <div class="line"><div class="down" style="<#if opa.isodd>float:right;<#else>float:left;</#if>"></div></div>
                        </#if>
                    </#list>
                </dd>
            </dl>
            <dl  class="nowrap">
                <dd class="exdd"><div class="product">质检工序</div><div class="quelity">生产工序</div>
                <div class="product"><div style="width:10px;line-height:10px;float:left">v</div><div style="width:45px;margin-left: 0px;line-height:25px;float:right">确认点</div></div></dd>
            </dl>
            </#if>
        </fieldset>
    </div>
</div>
